﻿<%@ Page Language="c#" Inherits="Discuz.Web.Admin.adduser" CodeBehind="global_adduser.aspx.cs" %>

<%@ Register Src="../UserControls/PageInfo.ascx" TagName="PageInfo" TagPrefix="uc1" %>
<%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>添加用户</title>
    <script type="text/javascript" src="../js/common.js"></script>
    <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" />
    <link href="../styles/modelpopup.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../js/modalpopup.js"></script>
    <script type="text/javascript">

        function IsValidPost() {
            var admingroup = "";
            var groupid = document.getElementById("groupid");
            if ((groupid.value == "1") || (groupid.value == "2") || (groupid.value == "3")) {
                admingroup = groupid.options[groupid.value].innerHTML;
            }
            if (groupid.value == "0") {
                alert('您未选择所属用户组');
                return false;
            }
            if (admingroup != "")
                if (confirm('您是要添加 "' + admingroup + '" 组的用户吗?')) {
                    return true;
                }
                else {
                    return false;
                }
            return true;
        }
    </script>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
</head>
<body>
    <div class="ManagerForm">
        <form id="Form1" method="post" runat="server">
        <fieldset>
            <legend style="background: url(../images/icons/icon9.jpg) no-repeat 6px 50%;">添加单个用户</legend>
            <div>
                <table width="100%">
                    <tr>
                        <td class="item_title" colspan="2">
                            用户名
                        </td>
                    </tr>
                    <tr>
                        <td class="vtop rowform">
                            <cc1:textbox id="userName" runat="server" CanBeNull="必填" RequiredFieldType="暂无校验"
                                MaxLength="20" Size="30">
                            </cc1:textbox>
                        </td>
                        <td class="vtop">
                        </td>
                    </tr>
                    <tr>
                        <td class="item_title" colspan="1">
                            密码
                        </td>
                        <td class="item_title">
                            来自
                        </td>
                    </tr>
                    <tr>
                        <td class="vtop rowform">
                            <cc1:TextBox ID="password" runat="server" CanBeNull="必填" MaxLength="32" RequiredFieldType="暂无校验"
                                Size="30"> 
                            </cc1:TextBox>
                         <br />  <span style="color:Red"> 默认密码：potevio11</span>
                        </td>
                        <td class="vtop">
                            <cc1:textbox id="userfrom" runat="server" CanBeNull="必填" RequiredFieldType="数据校验"
                                width="200" MaxLength="100" Size="110">
                            </cc1:textbox>
                        </td>
                    </tr>
                    <tr>
                        <td class="item_title" colspan="1">
                            E-mail
                        </td>
                        <td class="item_title">
                            所属公司及部门
                        </td>
                    </tr>
                    <tr>
                        <td class="vtop rowform" colspan="1">
                            <cc1:textbox id="email" runat="server" CanBeNull="必填" RequiredFieldType="电子邮箱" Width="200"
                                MaxLength="50" Size="60">
                            </cc1:textbox>&nbsp;&nbsp;<input id="sendemail" type="checkbox" runat="server" checked="checked" />发送邮件到上述邮箱中
                        </td>
                        <td>
                            <cc1:textbox id="websit" runat="server" CanBeNull="必填" RequiredFieldType="数据校验" width="200"
                                MaxLength="100" Size="110">
                            </cc1:textbox>
                        </td>
                    </tr>
                    <tr>
                        <td class="item_title">
                            所属用户组
                        </td>
                        <td class="item_title">
                            积分设置
                        </td>
                    </tr>
                    <tr>
                        <td class="vtop rowform">
                            <cc1:DropDownList id="groupid" runat="server">
                            </cc1:DropDownList>
                        </td>
                        <td class="vtop rowform">
                            <cc1:textbox id="credits" runat="server" CanBeNull="必填" RequiredFieldType="数据校验"
                                MaxLength="8" Size="10">
                            </cc1:textbox>设置用户的初始积分
                        </td>
                    </tr>
                    <tr>
                        <td class="item_title">
                            真实姓名
                        </td>
                        <td class="item_title">
                            身份证号
                        </td>
                    </tr>
                    <tr>
                        <td class="vtop rowform">
                            <cc1:textbox id="realname" runat="server" RequiredFieldType="暂无校验" MaxLength="10"
                                Size="10">
                            </cc1:textbox>
                        </td>
                        <td class="vtop rowform">
                            <cc1:textbox id="idcard" runat="server" MaxLength="20" Size="20">
                            </cc1:textbox>
                        </td>
                    </tr>
                    <tr>
                        <td class="item_title">
                            移动电话号码
                        </td>
                        <td class="item_title">
                            固定电话号码
                        </td>
                    </tr>
                    <tr>
                        <td class="vtop rowform">
                            <cc1:textbox id="mobile" runat="server" MaxLength="20" Size="20">
                            </cc1:textbox>
                        </td>
                        <td class="vtop rowform">
                            <cc1:textbox id="phone" runat="server" CanBeNull="可为空" MaxLength="20" Size="20">
                            </cc1:textbox>
                        </td>
                    </tr>
                </table>
                <cc1:Hint id="Hint1" runat="server" HintImageUrl="../images">
                </cc1:Hint>
                <div class="Navbutton">
                    <cc1:Button id="AddUserInfo" runat="server" Text=" 提 交 ">
                    </cc1:Button>&nbsp
                    <input style="width: 80px; height: 31px; cursor: pointer;" type="button" onclick="window.location=location"
                        value="取消" />
                </div>
            </div>
        </fieldset>
        <fieldset>
            <legend style="background: url(../images/icons/icon9.jpg) no-repeat 6px 50%;">添加多个用户</legend>
            <uc1:PageInfo ID="info1" runat="server" Icon="information" Text="<span style='color:red'>注意Excel表列名字段必须为:用户名(必填,不能重复)，邮箱(必填)，手机号(选填)，固定电话(选填)，来自(选填)，姓名（选填），所属公司及部门（选填）<br/>所有用户的初始密码为：potevio11 </span>" />
            <span style="float: left; margin-top: 30px">
                <asp:Button runat="server" Text="Excel批量导入" ID="AddUsers" OnClick="AddUsers_Click" />
                &nbsp
                <input type="button" value="取消" onclick="javascript:window.location.reload();" />
                &nbsp
                <asp:FileUpload ID="FileUpload1" runat="server" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                    ControlToValidate="FileUpload1" EnableTheming="True"></asp:RequiredFieldValidator>
            </span>
        </fieldset>
        </form>
    </div>
    <%=footer%>
</body>
</html>
